/* 
 * File:   ClientChallenge.h
 * Author: Denys Knertser
 *
 * Created on February 16, 2012, 12:51 AM
 */

#include "PacketFormat.h"
#include <string>
#include <openssl/rand.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>

#ifndef CLIENTCHALLENGE_H
#define	CLIENTCHALLENGE_H

class ClientChallenge: public PacketFormat {
public:
    ClientChallenge();
    std::string getChallenge();
private:
    std::string challenge;
    int generateChallengeValue(); // generate random 16 byte string and put it into "value"
    int encryptChallengeValue(); // encrypt "value" with server public key and put it into "value"
};

#endif	/* CLIENTCHALLENGE_H */

